export default {
  methods: {
    goGet() {
      const token = window.localStorage.getItem('token')
      const index_url = 'http://zhiyang.yizehd.com/zhuli'
      if (!token) {
        this.shouquan()
      } else {

        this.shouquan()
      }
    },
    shouquan() {
      window.localStorage.removeItem('token')
      window.location.href = 'http://zhiyang.yizehd.com/api/auth/auth?state=1&uri=' + index_url;
      return
    },
    getQueryString(name) {
      let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
      let r = window.location.search.substr(1).match(reg);
      if (r != null) {
        return unescape(r[2]);
      }
      return null;
    }
  }
}
